function main(params) {
    debugger
    const self = this;
    let selectedRows = self.$$("table_cjk8s").$$getSelection().selectedRows;
    let hasRowFlag = false;
    if(selectedRows.length > 0){
        hasRowFlag = true;
    }else{
        hasRowFlag = false;
        self.$message.warning("请选择要删除的行");
    }
    return hasRowFlag;
}



function main(params) {
    debugger
    const self = this;
    const selectedRows = self.$$("table_cjk8s").$$getSelection().selectedRows;
    const recIdList = selectedRows.map(row => row.rec_id.value);
    const taskNumString = selectedRows.map(row => row.task_num.value).join(",");
    deleteRec(recIdList)
}


function deleteRec(recIdList) {

    //{
    //   "recIdList": [
    //     99999999,
    //     99999998
    //   ],
    //   "opinion": "批量作废"
    // }
    let jsonParams = {
        recIdList: [recIdList]
    };
    api.DATA_SOURCE_EXECUTE("ds_api:d4fd4546-c043-4a9e-80d9-5e1cc16fa441", "api", queryParams, [], JSON.stringify(jsonParams)).then((res) => {
        return new Promise((resolve, reject) => {
            api.DATA_SOURCE_EXECUTE("ds_api:d4fd4546-c043-4a9e-80d9-5e1cc16fa441", "api", queryParams, [], JSON.stringify(jsonParams)).then((res) => {
                console.log("响应", res);
            });
        })
    });
}
